package NiuKe;

import java.util.*;

public class ConsoleInput {

    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        ConsoleInput m = new ConsoleInput();
        int [][]num = new int[3][3];
        int i = 0;
        /*while (i < 3){
            num[i] = m.inputInt( input.nextLine() );
            i++;
        }*/

        int [][]num2 = new int[3][3];
        i = 0;
        while (i < 3){
            num2[i] = m.getInt( input.nextLine() );
            i++;
        }

//        m.showInt(num);
        m.showInt(num2);



    }

    public int[] inputInt(String str){//使用StringTokenizer对象进行分割
        int []array = new int[3];
        StringTokenizer stringTokenizer = new StringTokenizer(str);
        int length = stringTokenizer.countTokens();
        int i = 0;
        while (i < length){
            array[i] = Integer.parseInt(stringTokenizer.nextToken());
            i++;
        }
        return array;
    }

    public int[] getInt(String str){//使用String中的split()方法进行分割，返回一个字符串的数组
        int []array = new int[3];
        String [] strings = str.split(" ");

        int length = strings.length;
        int i = 0;
        while (i < length){
            array[i] = Integer.parseInt(strings[i]);
            i++;
        }
        return array;
    }

    public void showInt(int [][]a){//控制台显示一个二维数组
        for (int i = 0; i  < a.length;i++){
            System.out.println(a[i][0]+" "+a[i][1]+" "+a[i][2]);
        }
        System.out.println();
    }



}
